function personalizeGreeting(){
    var name = document.getElementById("name").value;
var greeting="你好"+name+"，请问你买吗？";
    document.getElementById("greeting").textContent=greeting;
}


var box = document.getElementById("box");
var position = 0;
var direction = 1;

function animate() {
  if (position >= 600) {
    direction = -1;
  } else if (position <= 0) {
    direction = 1;
  }

  position += direction;
  box.style.left = position + "px";

  requestAnimationFrame(animate);
}

animate();


